<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCitysTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('citys', function (Blueprint $table) {
            $table->increments('id');
            $table->string('cityuid',64)->default('')->comment('城市编码');
            $table->unsignedSmallInteger('child_count')->comment('城市子城市数量');
            $table->string('p_code',64)->default('')->comment('父城市');
            $table->string('zh',64)->default()->comment('中文');
            $table->string('en',64)->default()->comment('英文');
            $table->string('tw',64)->default()->comment('繁体');
            $table->unsignedSmallInteger('level')->comment('城市等级');
            $table->timestamps();
            $table->softDeletes();
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation='utf8_general_ci';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('citys');
    }
}
